package com.heima.user.Feign;

import com.heima.model.article.pojos.ApAuthor;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("leadnews-article")
public interface ApAuthorFeign {

    /**
     * 文章作者添加用户
     *
     * @param apAuthor
     * @return
     */
    @PostMapping("/api/v1/author/seveApAuthor")
    public ResponseResult seveApAuthor(@RequestBody ApAuthor apAuthor);

    /**
     * 根据Id查询作者
     * @param id
     * @return
     */
    @GetMapping("/api/v1/author/one/{id}")
    ApAuthor selectById(@PathVariable("id") Integer id);
}

